package win.demonlegion.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import win.demonlegion.mapper.DynamicMapper;
import win.demonlegion.module.DynamicBean;
import win.demonlegion.service.inte.DynamicService;

import java.util.List;

@Service("dynamicService")
public class DynamicServiceImpl implements DynamicService {
    private static final Logger logger = LoggerFactory.getLogger(DynamicServiceImpl.class);

    @Autowired
    private DynamicMapper dynamicMapper;

    @Override
    public int count() {
        return dynamicMapper.count();
    }

    @Override
    public List<DynamicBean> findAll() {
        return dynamicMapper.findAll();
    }

    @Override
    public DynamicBean selectById(String id) {
        return dynamicMapper.selectById(id);
    }

    @Override
    public int add(DynamicBean dynamicBean) {
        return dynamicMapper.add(dynamicBean);
    }

    @Override
    public int update(DynamicBean dynamicBean) {
        return dynamicMapper.update(dynamicBean);
    }

    @Override
    public int deleteById(String id) {
        return dynamicMapper.deleteById(id);
    }
}
